package com.wenlin.userservice.exception;

/**
 * Created by Tech601 on 2017/5/9.
 */
public enum ErrorCode {

    // 请求状态
    SUCCESS(0, "请求成功"),
    NOT_FOUND(40001, "请求资源不存在或已经删除"),
    ILLEGAL_ARGUMENT(40002, "参数不合法"),

    // 短信验证码服务
    LIMIT_RATE(1, "服务器繁忙或者二维码信息不存在"),
    LIMIT_SITE(40002, "站点信息有误，系统找不到对应站点"),
    INVALID_VER_CODE(101112, "验证码已失效"),
    ERROR_VER_CODE(101113, "验证码错误"),

    SERVER_BUSY(1, "服务器繁忙");



    private final int value;

    private final String reasonPhrase;

    ErrorCode(int value, String reasonPhrase) {
        this.value = value;
        this.reasonPhrase = reasonPhrase;
    }

    /**
     * Return the integer value of this status code.
     */
    public int value() {
        return this.value;
    }

    /**
     * Return the reason phrase of this status code.
     */
    public String getReasonPhrase() {
        return this.reasonPhrase;
    }
}
